import request from "@/utils/request";

let comApi = '/cgi-bin/entry.cgi'

//查询媒体列表
export function queryMediaList(data) {
  return request({
    url: `${comApi}/system/media-list`,
    method: "post",
    data,
  });
}

//查询媒体下发记录列表
export function queryMediaDeliveringList(data) {
  return request({
    url: "/media/record",
    method: "post",
    data,
  });
}



//增加媒体
export function addMedia(data) {
  return request({
    url: `${comApi}/system/media-add`,
    method: "post",
    data,
  });
}

//修改媒体
export function updateMedia(data) {
  return request({
    url: `${comApi}/system/media-update`,
    method: "post",
    data,
  });
}

//删除媒体
export function deleteMedia(data) {
  return request({
    url: `${comApi}/system/media-delete`,
    method: "post",
    data,
  });
}

//上传图片
export function mediaImageUpload(data) {
  return request({
    url: "/media/upload",
    method: "post",
    data,
  });
}


//重发
export function mediaReDelivering(data) {
  return request({
    url: "/media/repeat",
    method: "post",
    data,
  });
}


//重发策略
export function strategyReDelivering(data) {
  return request({
    url: "/trafficRule/repeat",
    method: "post",
    data,
  });
}


//查询策略下发记录列表
export function queryStrategyDeliveringRecordList(data) {
  return request({
    url: "/trafficRule/record",
    method: "post",
    data,
  });
}
